package com.im.action;

import java.util.List;

import com.im.entity.Image;
import com.im.logic.*;



public class ImageAction extends BaseAction{
	/**
	 * 
	 */
	private static final long serialVersionUID = 6834097195687492955L;
	private ImageHandler imageHander = imageHandlerFac.create();
	private List<Image> images = null;
	
	public String image(){
		if(column_name != null && !column_name.isEmpty() && !type.equals("")){
			column = colHandler.getColumnByName(column_name);
			images = imageHander.getImageByType(type);
			if(images ==  null || images.size() ==0)
				return "error";
			else{
				column.setObject(images);
				return column.getModel_name();
			}
		}else{
			return "error";
		}
		
	}
}
